package com.xuxin.oauth2.credentials.entity;

import com.xuxin.oauth2.credentials.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.security.core.GrantedAuthority;

/**
 * @Author: Gosin
 * @Date: 2020/6/1 21:31
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class Permission extends BaseEntity implements GrantedAuthority {

    private static final long serialVersionUID = 1L;

    private String url;

    private String name;

    private String description;

    private Long pid;

    @Override
    public String getAuthority() {
        return url;
    }
}
